Skip to content

Order chat history consistently for clarification and streaming - #2829

Merged
Chris0Jeky merged 1 commit into
mainfrom
issue-2004/ordered-chat-history
Sep 9, 2026
Merged

Order chat history consistently for clarification and streaming#2829
Chris0Jeky merged 1 commit into
mainfrom
issue-2004/ordered-chat-history

Conversation

@Chris0Jeky

Copy link
Copy Markdown
Owner

Chat history loaded through EF relationship fixup can arrive in insertion order, causing clarification and streaming consumers to read the wrong last turn. Expose a chronological domain snapshot ordered by CreatedAt, with Id as a deterministic tie-breaker, so every consumer sees the same history. DTO mapping uses that ordered snapshot directly.

Refs #2004. This resolves the chronological read contract; it does not claim full issue completion or recover unrecorded causal order between identical timestamps.

Validation at fe4cf5c against 22fcac4:

  • Red-first scrambled-history regressions, then targeted Domain 33, ChatService 124, and API/SSE/repository 30 tests passed.
  • dotnet test backend/Taskdeck.sln -c Release -m:1: 9089 passed, 5 skipped, exit 0 (author observed).
  • Fresh independent Terra review: SHIP, no HIGH/CRITICAL; independently Domain 33, Application 91, SQLite repository 2 tests passed. Diff check clean.
  • Covers ordinary clarification, streaming provider context, deterministic ties, and a real SQLite tracked session populated through descending message materialization.
  • No browser or live provider run. Hosted CI pending. Existing nullable/async compiler warnings remain.

Six files only; no schema/auth/provider or frontend changes. Canonical STATUS, MASTERPLAN and human-action file are unchanged; coordinator checkpoint records delivery state.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T13:30:14.856047Z fe4cf5c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Chris0Jeky Chris0Jeky moved this from Pending to Review in Taskdeck Execution Sep 9, 2026
@Chris0Jeky

Copy link
Copy Markdown
Owner Author

Coordinator cleanup: local and remote fe4cf5c agree, tracked state clean. Ignored inventory was .tmp/ plus generated backend bin/obj. Preserved .tmp/ordered-history-review.diff outside the removed checkout at .claude/local/milestone-20260909/preserved-2829/review-evidence/. Author full gate tool session 27893 completed exit 0 (9089 passed, 5 skipped), with no file-backed test log. Worker confirmed no remaining worktree process. Plain git worktree remove succeeded; remote source branch remains. Fresh Terra independently passed Domain 33, Application 91 and SQLite repository 2 tests. Hosted CI still pending; no merge claim.

@Chris0Jeky

Copy link
Copy Markdown
Owner Author

Delivery is now held for combined candidate #2830 at 3923500 on main06bd4d18e. It preserves the reviewed source commit, passed the full combined backend9096/5skip and frontend6243/3skip suites, browser SC-005, builds/lint/doc links, and fresh Terra integration review. Do not merge sources independently while the combined exact-base/head hosted gate qualifies. Once #2830 lands, coordinator will verify inclusion and reconcile these source PRs. Existing tracked MEDIUMs remain open; no new feature changes added.

@Chris0Jeky
Chris0Jeky merged commit 3923500 into main Sep 9, 2026
35 checks passed
@Chris0Jeky
Chris0Jeky deleted the issue-2004/ordered-chat-history branch September 9, 2026 14:13
@github-project-automation github-project-automation Bot moved this from Review to Done in Taskdeck Execution Sep 9, 2026
@Chris0Jeky

Copy link
Copy Markdown
Owner Author

Delivered through #2830, merged as cca0716. Main tree c73859a9ba712192935fc13586260ab61a9fb22c exactly equals qualified39235004b; all three source heads are verified ancestors. GitHub automatically marked #2827/#2828/#2829 merged through preserved commits. Required ci-required.yml run34358736114 passed at the exact head/base, fresh Terra review passed and no unresolved threads remained. Tracked MEDIUMs remain follow-ups; no full parent-issue completion claim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant